<?php
// echo '["\'access\'","\'action\'"]';exit;
if (strlen($_REQUEST['search-text']) < 1)
{
	print '[]';
	exit;
}
$terms = array(
	'access',
	'action',
	'xml',
	'xmls',
	'xoops'
);
$possibilities = array();
foreach ($terms as $term)
{
	if (strpos($term, strtolower($_REQUEST['search-text'])) === 0)
	{
		$possibilities[] = str_replace("'", "\\'", $term);
	}
}
echo json_encode($possibilities);
?>